package customer.GUI.components.actions;

import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import javax.swing.AbstractAction;

import customer.core.InitManager;

public class NetPlayLinkerAction extends AbstractAction{

	private String targetLink = "";
	
	public NetPlayLinkerAction()
	{
		targetLink = InitManager.getCurrentUser().getLoadedConfig().getProperty("server_address")+"/subscribe";
	}
	
	public void actionPerformed(ActionEvent e) {
		try {
			Desktop.getDesktop().browse(new URI(targetLink));
		} catch (Exception e1) {
			e1.printStackTrace();
		} 
	}

	public String getTargetLink() {
		return targetLink;
	}

	public void setTargetLink(String targetLink) {
		this.targetLink = targetLink;
	}

}
